package com.pureut.order.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.page.TableDataInfo;
import com.pureut.order.dto.SubcontractingOrderDto;
import com.pureut.order.dto.SubcontractingOrderMaterialDetailDto;
import com.pureut.order.service.SubcontractingOrderMaterialDetailService;
import com.pureut.order.vo.SubcontractingOrderVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/***
 * 委外订单物料明细 控制层
 * Author:C
 * Date:2022/12/02 15:11
 * @DESC
 */
@RestController
@RequestMapping("/subcontracting-order-material-detail")
public class SubcontractingOrderMaterialDetailController extends BaseController {


    @Resource
    SubcontractingOrderMaterialDetailService subcontractingOrderMaterialDetailService;

    /**
     * 获取委外订单物料明细列表
     * @param id
     * @return
     */
    @GetMapping("/list/{id}")
    public TableDataInfo list(@PathVariable("id") Long id) {
        startPage();
        //查询委外订单物料明细列表
        List<SubcontractingOrderMaterialDetailDto> list = subcontractingOrderMaterialDetailService.getList(id);
        return getDataTable(list);
    }
}
